package com.yyx.config;

import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author YongXin
 * @date Created in 2021/10/9 9:22
 */
@Configuration
public class SolrJConfig {

    @Value("${url}")
    private String url;
    @Bean
    public SolrClient solrClient(){
        return new HttpSolrClient.Builder(url).build();
    }

}
